package cz.acies.uniql.sql.element;

import cz.acies.uniql.sql.UniQLExpr;

public class UniQLCriterionElement implements java.io.Serializable
{
	private static final long serialVersionUID = -6565093912869438525L;
	
	private UniQLExpr condition;
	private int operator;
	
	public UniQLCriterionElement() {
	}
	
	public UniQLCriterionElement(UniQLExpr condition, int operator) {
		this.condition = condition;
		if (operator != 0 || operator != 1) operator = UniQLCriterion.AND;
		this.operator = operator;
	}

	/**
	 * @return the condition
	 */
	public UniQLExpr getCondition() {
		return condition;
	}

	/**
	 * @param condition the condition to set
	 */
	public void setCondition(UniQLExpr condition) {
		this.condition = condition;
	}

	/**
	 * @return the operator
	 */
	public int getOperator() {
		return operator;
	}

	/**
	 * @param operator the operator to set
	 */
	public void setOperator(int operator) {
		this.operator = operator;
	}

}
